// dbgserv.cpp : Defines the entry point for the application.
//

#include "stdafx.h"
#include "dbgserv.h"
#include "idbgserv.h"

CDbgService DbgService;

#ifdef __cplusplus
	extern "C" {
#endif

HRESULT
__declspec(dllexport)
WINAPI
DbgService_QueryInterface (
	__out PVOID* Interface
	)
{
	*Interface = &DbgService;

	return S_OK;
}

#ifdef __cplusplus
	}
#endif

BOOL
APIENTRY
DllMain (
	HMODULE hModule,
	DWORD  ul_reason_for_call,
	LPVOID lpReserved
	)
{
	UNREFERENCED_PARAMETER( hModule );
	UNREFERENCED_PARAMETER( lpReserved );

	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
		CoInitialize( NULL );
		break;

	case DLL_THREAD_ATTACH:
		break;

	case DLL_THREAD_DETACH:
		break;

	case DLL_PROCESS_DETACH:
		CoUninitialize();
		break;
	}

	return TRUE;
}